Cocktail Help Reference
Add Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > ObjectManager<TKey,T> Class : Add Method



key
The key under which the instance should be filed away.
obj
The object instance to be added.

Glossary Item Box

Allows to manually add an object instance to the ObjectManager.

Syntax

Visual Basic (Declaration) 
Public Sub Add( _
   ByVal key As TKey, _
   ByVal obj As T _
) 
Visual Basic (Usage)Copy Code
Dim instance As ObjectManager(Of TKey,T)
Dim key As TKey
Dim obj As T
 
instance.Add(key, obj)
C# 
public void Add( 
   TKey key,
   T obj
)
C++/CLI 
public:
void Add( 
   TKey^ key,
   T^ obj
) 

Parameters

key
The key under which the instance should be filed away.
obj
The object instance to be added.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.